home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / qtools.arc / QMAC208.ARC / MACROS.DOC < prev    next >
Text File  |  1990-08-24  |  11KB  |  286 lines

  1.  
  2.  
  3.  
  4.           QMacros  --  Miscellaneous Macro Files for QEdit
  5.  
  6.          A collection of keyboard macro files for use with
  7.                QEdit, the Quick Editor, by SemWare.
  8.  
  9.                          Release: 1.00
  10.                     Date:  November 17th, 1989
  11.  
  12.      QEdit and QMac are Copyright (C) 1985-1989 by SemWare.
  13.               All Rights Reserved.
  14.  
  15.  
  16. DESCRIPTION
  17. -----------
  18. QEdit has a very useful macro language built in.  However, many
  19. users are not aware of its capabilities and therefore do not take
  20. advantage of it.
  21.  
  22. Included with this file are various macros that have been created
  23. for use with QEdit for DOS version 2.08 or QEdit for OS/2 version
  24. 1.0.  Each provides some useful capability or automates some task
  25. not already built-in to QEdit.
  26.  
  27. All are useful in and of themselves, but they are most useful as
  28. examples of what is possible with QEdit's macro language.  By
  29. examining these macros, you can discover some of the things that
  30. are possible, and use this knowledge to create better macros for
  31. your own use.
  32.  
  33. You will need a copy of QMac, version 2.0 or higher, for use with
  34. these macros.  This should be included with this file, look for
  35. QMAC.EXE and QMAC.DOC.
  36.  
  37.  
  38.  
  39. CONTENTS
  40. --------
  41. The following macro files are provided:
  42.  
  43.      MACROS.DOC     this file
  44.      MACROS.QM      a collection of miscellaneous short macros
  45.      BIGFIND.QM     an external find/grep macro
  46.      CHANGE.QM      an automated search/replace on up to 100 files
  47.      QASCII.QM      an ASCII chart macro
  48.      QASCII.LST     the ASCII chart itself
  49.      SCRATCHS.QM    a macro to automatically load scratch buffers
  50.      SCRATCHS.LST   a sample scratch buffer data file
  51.  
  52.  
  53.  
  54. INSTRUCTIONS
  55. ------------
  56. For most of these files, you will need to use the QMac utility to
  57. convert them to a "binary" macro file before you can use them
  58. with QEdit.  You should read QMAC.DOC for details, but here are
  59. some quick instructions.  For example, to make use of the Ascii
  60. Chart macro, you need to convert QASCII.QM to a loadable macro
  61. file.
  62.  
  63. Issue the following command at the DOS prompt:
  64.  
  65.       QMAC QASCII.MAC QASCII.QM /B /A-
  66.  
  67. QMac will build QASCII.MAC from the information in QASCII.QM.
  68. Now, from inside QEdit, you can issue the command MacroRead
  69. <ESC><M><R>, and specify QASCII.MAC, to load the macro into QEdit
  70. for use.
  71.  
  72. For convenient use of macros of this type, QEdit version 2.08 or
  73. higher (and QEdit for OS/2), has two command line switches.  The
  74. /L switch will load a macro file into QEdit on startup, so the
  75. macros will be ready for your use as soon as you enter the
  76. editor.  For example, if you type at the DOS prompt:
  77.  
  78.       Q myfile.txt /Lmymacros.mac
  79.  
  80. then the macros in the file MYMACROS.MAC will be loaded into
  81. QEdit along with the text file MYFILE.TXT.
  82.  
  83. The /E switch will EXECUTE the first macro in the named
  84. file, and then discard it.  Both /L and /E require a binary macro
  85. file name immediately after the switch and you can use a
  86. different or the same file name on both switches, if you combine
  87. them.
  88.  
  89. You may wish to supply a full drive and directory specification
  90. for your macro files when using /L and /E, so that QEdit can find
  91. them.
  92.  
  93.  
  94. MACROS.QM
  95. ---------
  96. This file contains a variety of short macros that were submitted
  97. by users.  These are all short enough so they can be put in your
  98. keyboard definition file, or used separately via QMac.
  99.  
  100. Some of the macros in this file include column copying and
  101. deleting commands, automatic loading of help or macro files, and
  102. a way to reload the current file from disk to get a fresh copy.
  103.  
  104. See the comments inside MACROS.QM for further details.
  105.  
  106.  
  107. BIGFIND.QM
  108. ----------
  109. This macro interfaces one of several external file searching
  110. programs with QEdit.  With it, you can do "regular expression"
  111. searching, even though QEdit does not have this capability built
  112. in.
  113.  
  114. The macro behaves differently than QEdit's own search and
  115. replace, because of the nature of external searching utilities.
  116. It must invoke the external program to do all the searching, then
  117. present the final results to you.
  118.  
  119. The macro is structured so that a screen filled with the found
  120. text appears at the end of the search.  You move the cursor to
  121. the line you would like to the cursor to be positioned on, and
  122. press Return.  QEdit will take you to that position in your
  123. original file.
  124.  
  125. Three separate macros are present in this file.  You should choose
  126. the one that matches the external find utility that you plan to
  127. use.  The first one uses the FIND command that comes with MS-DOS
  128. and PC-DOS.  The second one uses a free program called FGREP that
  129. can be found on many BBS's.  The third one can be used with most
  130. popular GREP utilities, including the ones that Borland and
  131. Microsoft supply with their language products.
  132.  
  133. Chose the macro that matches your search utility, convert it to a
  134. binary macro, and load it into QEdit.  See the comments inside
  135. BIGFIND.QM for further details.
  136.  
  137.  
  138. CHANGE.QM
  139. ---------
  140. This macro allows you to do a global search and replace on up to
  141. 100 files at once, all from the QEdit command line (or from
  142. inside QEdit).  It is a good example of how auto-execute macros
  143. can be used to make QEdit automate various tasks.
  144.  
  145. Normally, you invoke this macro from the DOS command line, by
  146. calling up QEdit as follows:
  147.  
  148.         Q first.fil second.fil third.fil /Echange.mac
  149.  
  150. The macro will pause and prompt you for a search and replace
  151. operation, just as it would in QEdit.  Answer the prompts
  152. normally, or press <Escape> to abort the process.
  153.  
  154. When the prompts are completed, the macro will proceed to execute
  155. that search and replace globally across all the files you loaded
  156. via the command line.  When the last file is saved to disk, the
  157. editor will exit back to DOS.
  158.  
  159. Thus, through this macro you can use QEdit as a command line
  160. utility to do search and replace operations on up to 100 text
  161. files at a time!  Be careful, though:  since the replace
  162. operation does not pause at each replacement, you could
  163. potentially change many, many files in one operation with this
  164. macro.  Be sure you are using the right set of files!
  165.  
  166.  
  167. QASCII
  168. ------
  169. These macros implement a "built in" ASCII table for QEdit.
  170.  
  171. It allows you to place the cursor on a key to be looked up, press
  172. one key, and have the Decimal, Hexadecimal, Binary, and English
  173. representation of that character appear.  The format of the ASCII
  174. chart is completely up to the user, but a sample file is supplied
  175. in QASCII.LST.
  176.  
  177. You will probably need to edit the macros in QASCII.QM to include
  178. the full drive, directory and name of your QASCII.LST file, so
  179. the macros will work equally well from any directory.  As is, the
  180. macros assume that QASCII.LST is always present in the current
  181. directory.
  182.  
  183. The QASCII.LST file is free-form, with one ASCII character
  184. represented per line.  The only restriction is that each
  185. character appear between parentheses in QASCII.LST, only once.
  186.  
  187. The Control-F4 macro requires that the ASCII character itself
  188. appear in Column 24 of each line, and that the first ASCII
  189. character appears on line 6 of the file.  If you change the
  190. format of the ASCII chart, you will have to edit the third macro
  191. appropriately, particularly the GotoLine and GotoColumn commands.
  192.  
  193. The rest of each line in QASCII.LST can contain numeric or other
  194. descriptions of that ASCII character, subject to your whim.  The
  195. sample QASCII.LST displays the character in Decimal, Hexadecimal,
  196. Binary, and by Name.
  197.  
  198. Due to restrictions on ASCII text files, and the way QEdit reads
  199. them, the Carriage Return, Line feed and Tab characters cannot
  200. appear "literally" in the QASCII.LST file.  The sample file has
  201. these characters translated to 00h, but their descriptions are
  202. left in for completeness.
  203.  
  204. There are three macros supplied.  The first one will "look up"
  205. the character under the cursor, bringing the ASCII chart up on
  206. the screen as a window below the current one.
  207.  
  208. The second one also looks up the current character, but it
  209. displays the results in a box near the cursor line.  Press
  210. <Return> or <Escape> to continue editing.
  211.  
  212. The third macro opens the ASCII chart and places the cursor in
  213. it.  The user can then scroll to a desired ASCII character, and
  214. then press <Return>.  The ASCII character on the cursor line will
  215. be inserted in your original file for you.  This is intended as
  216. an easier way to find and insert certain characters that are
  217. difficult to type.
  218.  
  219. Try all three macros out to see which one(s) you like best.  See
  220. the comments inside QASCII.QM for further information.
  221.  
  222.  
  223. SCRATCHS.QM
  224. -----------
  225. This macro is an auto-execute macro for use with the /E
  226. switch in QEdit.  Its purpose is to prepare a set of 0 to 10
  227. named Scratch Buffers by loading them with pre-set text from
  228. a file.
  229.  
  230. Scratch Buffers are very handy for storing often used text,
  231. but unfortunately they are lost when you exit QEdit.  Using
  232. this macro, you can have a permanent copy of your scratch
  233. buffers kept in an editable disk file, and have them loaded
  234. into the appropriate spots every time QEdit loads.
  235.  
  236. This macro loads your scratch buffers from a file called
  237. SCRATCHS.LST.  You chould edit the macro in SCRATCHS.QM before
  238. translating it with QMac, to include the full drive and directory
  239. of your SCRATCHS.LST file.  As is, the macro assumes that this
  240. file is always present in the current directory.
  241.  
  242. This is automated through use of the /E command line switch of
  243. QEdit.  You can invoke QEdit as follows:
  244.  
  245.      Q myfile.txt /Escratchs.mac
  246.  
  247. and the SCRATCHS macro will automatically execute, preparing your
  248. scratch buffers for use in editing.
  249.  
  250. If you invoke QEdit via a batch file, you can arrange for the /E
  251. parameter to be supplied every time without having to type it,
  252. saving some trouble.   Or, you can use utilities like CED, PCED,
  253. 4DOS or ANARKEY to supply the /E parameter for you automatically.
  254.  
  255. See inside SCRATCHS.QM for details on its use.
  256.  
  257. SCRATCHS.LST is a sample data file for use with this macro, edit
  258. this to include your scratch buffer text.
  259.  
  260.  
  261. ACKNOWLEDGEMENTS
  262. ----------------
  263. Several of these files were originally submitted by users on
  264. SemWare's BBS.  Thanks to the users who contributed, and others
  265. for their input.                         
  266.  
  267.  
  268. CONTACT
  269. -------
  270. If you have any questions or suggestions, please contact:
  271.  
  272. SemWare
  273. 4343 Shallowford Road
  274. Suite C-3
  275. Marietta, GA  30062-5003
  276.  
  277. Voice Phone: (404) 641-9002   9 a.m to 5 p.m. E.T., Mon-Fri.
  278. BBS Phone:   (404) 641-8968,  2400 bps
  279.  
  280.  
  281. REVISION HISTORY
  282. ----------------
  283. Version 1.00 -- 17-Nov-1989
  284.  
  285.             * * *  end  * * *
  286.